package com.ym.medical.dao;

import com.alibaba.fastjson.JSONObject;
import com.ym.medical.domain.entity.CounsellingRoomEntity;
import com.ym.medical.domain.param.CounsellingRoomParam;
import com.ym.medical.domain.vo.CounsellingRoomRecordVO;
import org.springframework.stereotype.Repository;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

/**
 * 咨询关联关系, 如全科问诊后转诊到专科，需要记录两者问诊之前的关系。Dao接口
 *
 * @author ym
 * @date 2020-08-24
 */
@Repository
public interface CounsellingRoomDao extends Mapper<CounsellingRoomEntity> {


	List<CounsellingRoomRecordVO> listDoctorVisitRecord(CounsellingRoomParam counsellingRoom);


	List<CounsellingRoomRecordVO> listPatientVisitRecord(CounsellingRoomParam counsellingRoom);


	/**
	 * 根据聊天室ID获取订单信息
	 *
	 * @param roomId
	 * @return
	 */
	List<JSONObject> getOrderInfoByRoomId(Long roomId);

	/**
	 * 医生端答复列表
	 *
	 * @param model
	 * @return
	 */
	List theInquiryList(CounsellingRoomParam model);

	/**
	 * 订单详情查看
	 *
	 * @param model
	 * @return
	 */
	CounsellingRoomRecordVO inquiryInfo(CounsellingRoomParam model);

	/**
	 * 患者问某个医生的问诊记录
	 *
	 * @param model
	 * @return
	 */
	List patientConsultationRecord(CounsellingRoomParam model);
}
